//
//  UFOWebViewController.m
//  unrivalledForUniverse
//
//  Created by dllo on 16/1/21.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "UFOWebViewController.h"

@interface UFOWebViewController ()<UIWebViewDelegate>
@property (nonatomic, retain) UIWebView *web;

@end

@implementation UFOWebViewController
- (void)dealloc
{
    self.web.delegate = nil;
    [_web release];
    [_html release];
    [super dealloc];
}
- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    self.view.backgroundColor = [UIColor whiteColor];
    
    UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
    button.frame = CGRectMake(0 * SCREENWIDTH / WIDTHSIXP, 30 * SCREENHEIGHT / HEIGHTSIXP, 50 * SCREENWIDTH / WIDTHSIXP, 50 * SCREENHEIGHT / HEIGHTSIXP);
    [button setImage:[UIImage imageNamed:@"fanhui232"] forState:UIControlStateNormal];
    [button addTarget:self action:@selector(buttonAction) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:button];
    
    //    创建UIWebView
    self.web = [[UIWebView alloc] initWithFrame:[UIScreen mainScreen].bounds];
    [self.view addSubview:self.web];
    self.web.delegate = self;
    NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@" http://lol.zhangyoubao.com/mobiles/item/%@?user_id=&token=&i_=801844CE-87DA-42D5-B028-286599ACDF87&t_=1453355120&p_=17705&v_=40070204&d_=ios&osv_=9.2&version=0&a_=lol&size=middle", self.html]]];
    [self.web loadRequest:request];
}

- (void)buttonAction
{

    [self dismissViewControllerAnimated:YES completion:^{
        
        
    }];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
